#include <iostream>
#include "FileUtils.h"
#include <string.h>
#include "core/boot/BootLoader.h"
#include <signal.h>
#ifdef __MINGW32__
#include <windows.h>
#endif
int main (int argc, char const *argv[]) {
    #ifdef __MINGW32__
    WSADATA wsaData;
    WSAStartup( MAKEWORD(2, 2), &wsaData);
    std::cout << "Running in windows" << std::endl;
    #else
    signal(SIGPIPE, SIG_IGN);
    #endif
    try {
        BootLoader bootLoader(argc, argv);
    } catch(const char * e) {
        std::cout << e << std::endl;
    } catch(const Exception& e) {
        std::cerr << e.what() << '\n';
    } catch(const int e) {
        std::cerr << strerror(e) << std::endl;
    }

    #ifdef __MINGW32__
    WSACleanup();
    #endif
    return 0;
}